package com.ec.edu.common.enums;

public enum RoomType {
    NONE(0, "noneRoomType"),
    ONE_TO_ONE(1, "oneRoomType"),
    ONE_TO_MANY(2, "manyRoomType"),

    ;

    int roomType;
    String serviceName;

    RoomType(int roomType, String serviceName) {
        this.roomType = roomType;
        this.serviceName = serviceName;
    }

    public int getRoomType() {
        return roomType;
    }

    public String getServiceName() {
        return serviceName;
    }

    public static RoomType getFromRoomType(int roomType) {
        for (RoomType type : RoomType.values()) {
            if (roomType == type.getRoomType()) {
                return type;
            }
        }
        return NONE;
    }
}
